<!-- ============================================= -->
<!-- webApp                                         -->
<!-- ============================================= -->

<project name="webApp" default="main" basedir=".">

  <description>
    Build the UI subproject within the Compiere project.
  </description>

  <!-- set global properties for this build -->
  <property name="src" value="src"/>
  <property name="build.dir" value="build"/>
  <property name="dist.dir" value="."/>

  <!--<property environment="env"/>-->
  <import file="../utils_dev/properties.xml"/>

  <!-- set path to include the necessary jar files for javac -->
  <path id="project.class.path">
    <pathelement path="${classpath}"/>
  	<fileset dir="../jboss/client" includes="*.jar"/>
    <pathelement location="../JasperReports/CompiereJasper.jar" />
    <pathelement location="../base/Base.jar" />
  </path>

  <target name="compile">
  	<echo>------ Compiling webApp</echo>
  	<mkdir dir="${build.dir}"/>
    <javac srcdir="${src}" destdir="${build.dir}" deprecation="on" debug="on">
      <classpath refid="project.class.path"/>
    </javac>
  </target>

  <target name="packaging">
  	<echo>------ packaging</echo>  	
  	<ant inheritall="false" antfile="packaging-build.xml"/>
  </target>	

  <target name="deploy-interface">
  	<echo>------ deploying interfaces to JasperReports</echo>  	
	<copy todir="../JasperReports/src">
			<fileset dir="src" includes="org/compiere/interfaces/*.java"/>
	</copy>
  </target>
	
  <target name="clean">
    <delete dir="${build.dir}"/>
    <delete file="webApp.war" failonerror="false"/>
    <delete file="webApp.ear" failonerror="false"/>
    <delete file="webAppEJB.jar" failonerror="false"/>  	
    <delete file="webEJB-client.jar" failonerror="false"/>  	
  </target>
	
  <target name="main"  depends="compile, packaging, deploy-interface" description="initialization target">
 	
  </target>

</project>
